package main

import (
	"github.com/gin-gonic/gin"
	"log"
	"qq_service/server/router"
)

func main() {
	r := gin.Default()
	router.Router(r)

	c := make(chan error)
	go func() {

		err := r.Run(":8080")
		if err != nil {
			c <- err
		}

	}()

	//go func() {
	//
	//	////延迟队列
	//	//err = lib.NewDelayedInitMQ()
	//	//if err != nil {
	//	//	c <- err
	//	//}
	//}()
	err := <-c
	log.Fatal("退出服务", err)

}
